home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / ansi / swears10.zip / SWEARS.DOC < prev    next >
Text File  |  1991-06-25  |  13KB  |  164 lines

  1. Help!
  2.   Here's the first release beta version of my "swears" curses-look-alike lib
  3. for the pc environment.  BUT I need help.  This package is far from complete,
  4. so why don't you try it with your Quick C compiler, and e-mail me some
  5. suggestions...
  6.   Thanks!
  7. Jim Dunn, dunn@andrews.edu
  8.  
  9.   /**************************************************************************\
  10.   *                                  Swears                                  *
  11.   *                 by Professor Von Ignatius Pseudo, E.K.C.P.               *
  12.   *                                                                          *
  13.   *  Swears is a C add-on library giving you various windowing and utility   *
  14.   *  functions provided in unix curses.  There's no termcap, but there IS    *
  15.   *  direct video screen writes with TRUE refresh functions!  Use at your    *
  16.   *  own risk...                                                             *
  17.   *                                                                          *
  18.   *  This implementation of Swears is for the Microsoft Quick C language on  *
  19.   *  the IBM PC compatibles, based on the unix curses package.  You'll need  *
  20.   *  the two files:  SWEARS.H and SWEARS.LIB (renamed from SWEARS_x.LIB) and *
  21.   *  these two files may be renamed to CURSES.H and CURSES.LIB if you like.  *
  22.   *  As usual, if you are having any problems, you might try a vacation...   *
  23.   *                                                                          *
  24.   *  Swears is TOTALLY, COMPLETELY, ENTIRELY free!  You may use the Swears   *
  25.   *  library to create any program, either free or for sale, without paying  *
  26.   *  any royalty fees.  You don't even have to display any sort of Swears    *
  27.   *  logo, copyright or info about Swears in your program, at all.  Swears   *
  28.   *  is IdeaRighted (I) 1990 by ACME F.S.P.F.  Please see attached document. *
  29.   *                                                                          *
  30.   *               Yes, this was another TEAM ATTACK project...               *
  31.   *    "I tried to get the team to work on it, but they attacked me !?!"     *
  32.   *                 -Professor Von Ignatius Pseudo, E.K.C.P.                 *
  33.   \***************************************************************************/
  34.  
  35.   ┌──────────────────────────────────────────────────────────────────────────┐
  36.   │                                                                          │
  37.   │  NAME                                                                    │
  38.   │                                                                          │
  39.   │       swears - screen functions to emulate the unix curses library.      │
  40.   │                                                                          │
  41.   │  SYNTAX                                                                  │
  42.   │                                                                          │
  43.   │       #include <swears.h>                                                │
  44.   │                                                                          │
  45.   │       This will automatically include the stdio.h header file.           │
  46.   │                                                                          │
  47.   │  DESCRIPTION                                                             │
  48.   │                                                                          │
  49.   │       This version of curses for the pc is based upon a direct           │
  50.   │       screen write algorithm.  No termcap is used, just arrays and       │
  51.   │       video memory writes.  The original screen is saved, an image       │
  52.   │       of the screen is built in memory and that memory is written        │
  53.   │       to the screen each time the REFRESH() function is called.          │
  54.   │       The INITSCR() function MUST be used before any other of the        │
  55.   │       functions, and you MUST end with ENDWIN() before exiting.          │
  56.   │                                                                          │
  57.   │  FUNCTIONS                                                               │
  58.   │                                                                          │
  59.   │       addch(ch)                add a character to stdscr                 │
  60.   │       addstr(str)              add a string to stdscr                    │
  61.   │                                                                          │
  62.   │       box(win,vert,hor)        draw a box around a window                │
  63.   │                                                                          │
  64.   │       cbreak()                 set cbreak mode                           │
  65.   │       clear()                  clear stdscr                              │
  66.   │       clearok(scr,boolf)       set clear flag for scr                    │
  67.   │       clrtobot()               clear to bottom on stdscr                 │
  68.   │       clrtoeol()               clear to end of line on stdscr            │
  69.   │                                                                          │
  70.   │       delch()                  delete a character                        │
  71.   │       deleteln()               delete a line                             │
  72.   │       delwin(win)              delete win                                │
  73.   │                                                                          │
  74.   │       echo()                   set echo mode                             │
  75.   │       endwin()                 end window modes                          │
  76.   │       erase()                  erase stdscr                              │
  77.   │                                                                          │
  78.   │       flushok(win,boolf)       set flush-on-refresh flag for win         │
  79.   │                                                                          │
  80.   │       getch()                  get a char through stdscr                 │
  81.   │       getcap(name)             get terminal capability name              │
  82.   │       getstr(str)              get a string through stdscr               │
  83.   │       gettmode()               get tty modes                             │
  84.   │       getyx(win,y,x)           get (y,x) co-ordinates                    │
  85.   │                                                                          │
  86.   │       inch()                   get char at current (y,x) co-ordinates    │
  87.   │       initscr()                initialize screens                        │
  88.   │       insch(c)                 insert a char                             │
  89.   │       insertln()               insert a line                             │
  90.   │                                                                          │
  91.   │       leaveok(win,boolf)       set leave flag for win                    │
  92.   │       longname(termbuf,name)   get long name from termbuf                │
  93.   │                                                                          │
  94.   │       move(y,x)                move to (y,x) on stdscr                   │
  95.   │       mvcur(lasty,lastx,newy,newx)                                       │
  96.   │                                actually move cursor                      │
  97.   │       newwin(lines,cols,begin_y,begin_x)                                 │
  98.   │                                create a new window                       │
  99.   │       nl()                     set newline mapping                       │
  100.   │       nocbreak()               unset cbreak mode                         │
  101.   │       noecho()                 unset echo mode                           │
  102.   │       nonl()                   unset newline mapping                     │
  103.   │       noraw()                  unset raw mode                            │
  104.   │                                                                          │
  105.   │       overlay(win1,win2)       overlay win1 on win2                      │
  106.   │       overwrite(win1,win2)     overwrite win1 on top of win2             │
  107.   │                                                                          │
  108.   │       printw(fmt,arg1,arg2,...)